namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class CommentMap : ClassMap<CommentDataModel>
    {
        #region Constructors and Destructors

        public CommentMap()
        {
            this.Table("Comment");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("CommentId");
            Map(x => x.ArticleCultureId).Column("ArticleCultureId");
            this.Map(x => x.CreationDate).Not.Nullable().Column("CreationDate");
            this.Map(x => x.LastModified).Not.Nullable().Column("LastModified");
            this.Map(x => x.Title).Column("Title");
            this.Map(x => x.Text).Column("Text");
            this.Map(x => x.AuthorId).Not.Nullable().Column("AuthorId");
            this.Map(x => x.AuthorFirstName).Column("AuthorFirstName");
            this.Map(x => x.AuthorLastName).Column("AuthorLastName");
        }

        #endregion
    }
}